#include<stdio.h>

int main()
{
	int i, j, max, sum, m_left, m_right;
	int arr[6] = {-2, 11, -4, 13, -5, -2};
	for (i = 0; i < 6; i++)
	{
		sum = 0;
		for (j = i; j < 6; j++)
		{
			sum += arr[j];
			if (max < sum)
			{
				max = sum;
				m_right = j;
				m_left = i; 
			} 
		}
	}
	
	printf("%d %d %d\n", m_left, m_right, max);
	
	return 0;
}

 
